package cn.wxManage.goodsManage.dao;

import cn.common.goods.dao.BaseGoodsCartMapper;
import cn.wxManage.goodsManage.model.GoodsCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Zhang on 2019/1/20.
 */
@Mapper
public interface GoodsCartMapper extends BaseGoodsCartMapper{
    List<GoodsCart> getCartList(@Param("userId") Integer userId);

    void deleteByGoodsId(@Param("goodsId") Integer goodsId,
                         @Param("userId") Integer userId);

    void deleteById(@Param("id") Integer id);

    GoodsCart isExist(@Param("userId") Integer userId,
                      @Param("goodsId") Integer goodsId,
                      @Param("goodsStyleId") Integer goodsStyleId);

    void updateStatusByIds(@Param("ids") List<Integer> ids,
                           @Param("status") String status);
}
